<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibsnoel.jsp"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <%@ include file="/commons/meta.jsp"%>
  <title>资源管理,初学者论坛,BeginCode,beginCode</title>
  <!-- Bootstrap -->
  <link href="${ctx}/css/bootstrap.css" rel="stylesheet">
  <link rel="stylesheet" href="${ctx}/css/templatemo_main.css">
  <script src="${ctx}/js/jquery.min.js"></script>
  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
  <div id="main-wrapper">
    <div class="navbar navbar-inverse" role="navigation">
      <div class="navbar-header">
        <div class="logo"><h1>BeginCode</h1></div>
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button> 
      </div>   
    </div>
    <div class="template-page-wrapper">
      <div class="navbar-collapse collapse templatemo-sidebar">
        <ul class="templatemo-sidebar-menu">
          <li><a href="index.html"><i class="fa fa-home"></i>工作台</a></li>
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 内容审核 <div class="pull-right"><span class="caret"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="${ctx}/admin/blogCheck.jsp">博文审核</a></li>
              <li><a href="${ctx}/admin/blogCommentCheck.jsp">留言审核</a></li>
              <li><a href="${ctx}/admin/codeCommentCheck.jsp">代码留言审核</a></li>
            </ul>
          </li>
          <li><a href="${ctx}/resource/init"><i class="fa fa-cubes"></i>创建资源</a></li>
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i>教程管理 <div class="pull-right"><span class="caret"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="${ctx}/admin/blogCheck.jsp">教程管理</a></li>
              <li><a href="${ctx}/course/init">创建教程</a></li>
              <li><a href="${ctx}/admin/codeCommentCheck.jsp">章节管理</a></li>
              <li><a href="${ctx}/chapter/wordChapter/init">创建章节</a></li>
            </ul>
          </li>
          <%--<li><a href="#"><i class="fa fa-map-marker"></i><span class="badge pull-right">42</span>Maps</a></li>--%>
          <%--<li class="active"><a href="#"><i class="fa fa-users"></i><span class="badge pull-right">NEW</span>Manage Users</a></li>--%>
          <%--<li><a href="#"><i class="fa fa-cog"></i>Preferences</a></li>--%>
          <li><a href="#" data-toggle="modal" data-target="#confirmModal"><i class="fa fa-sign-out"></i>退出</a></li>
        </ul>
      </div><!--/.navbar-collapse -->

      <div class="templatemo-content-wrapper">
        <div class="templatemo-content">
          <ol class="breadcrumb">
            <li>工作台</li>
            <li>资源编辑</li>
          </ol>
          <div class="row">
            <div class="col-md-12">
              <form role="form" id="chapterForm" name="chapterForm" action="/chapter/wordChapter"	method="post">
                <div class="form-group">
                  <label for="courseId"><span class="labelinfoblue"></span>所属教程</label>
                  <select class="form-control" name="courseId" id="courseId">
                    <c:forEach items="${courses }" var="course">
                      <option value="${course.courseId }" }  >${course.courseName}</option>
                    </c:forEach>
                  </select>
                </div>
                <div class="form-group">
                  <label for="chapterTitle"><span class="labelinfogreen"></span>标题</label>
                  <input type="text" class="form-control required" id="chapterTitle"	name="chapterTitle"  placeholder="章节标题">
                </div>
                <div class="form-group">
                  <label for="shortName"><span class="labelinfowarn"></span>标题简写</label>
                  <input type="text" class="form-control required" id="shortName"	name="shortName"  placeholder="标题简写">
                </div>
                <div class="form-group">
                  <label for="chapterAbstract"><span
                          class="labelinfosuccess"></span>摘要</label>
								<textarea class="form-control required" id="chapterAbstract" name="chapterAbstract" rows="3"
                                          placeholder="我们提议，为您的章节添加摘要，这也是给阅读者一个引导"></textarea>
                </div>
                <div class="form-group">
                  <label for="chapterContent"><span class="labelinfodanger"></span>章节内容</label>
                  <input type="hidden" name="chapterContent" class="required" id="chapterContent" value="" />
                  <div id="summernote"> </div>
                </div>
                <div class="form-group">
                  <label for="downcodeUrl"><span class="labelinfogreen"></span>下载地址</label>
                  <input type="text" name="downcodeUrl" class="form-control required"  id="downcodeUrl" value="" />
                </div>
                <div class="form-group">
                  <label for="orderNum"><span class="labelinfodu"></span>排序号</label>
                  <input type="text" name="orderNum" class="form-control required"  id="orderNum" value="" />
                </div>
                <div style="margin-top: 10px; text-align: center;">
                  <button type="button" id="chapterSend" class="btn btn-primary"
                          style="width: 100px;">提交</button>
                  <!-- 								&nbsp;&nbsp;&nbsp;&nbsp; -->
                  <!-- 								<button type="button" style="width: 100px;" -->
                  <!-- 									class="btn btn-primary">保存草稿</button> -->
                </div>
                <div>
                  <font color="red"><b>${msg }</b></font>
                </div>
                <p>&nbsp;</p>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
</div>
    <script src="${ctx}/js/templatemo_script.js"></script>
  <script src="${ctx}/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="${ctx}/js/summernote/lang/summernote-zh-CN.js"></script>
  <script src="${ctx}/js/summernote/summernote.min.js"></script>
  <link href="${ctx}/css/summernote/font-awesome.min.css"	rel="stylesheet">
  <link href="${ctx}/css/summernote/summernote.css" rel="stylesheet">
  <script src="${ctx}/js/validate/jquery.validate.js"></script>
  <script src="${ctx}/js/validate/jquery.metadata.js"></script>
  <script src="${ctx}/js/validate/messages_zh.js"></script>
  <script src="${ctx}/js/ajaxfileupload.js"></script>
  <script src="${ctx}/js/course/courseEdit.js"></script>
  <script src="${ctx}/js/summernote/summernotePlugin.js"></script>
  <script>
    var ctx = "${ctx}";
  </script>

  </body>
</html>